Battle.net D2 servers use a very simple LFSR (
https://en.wikipedia.org/wiki/Linear-feedback_shift_register).
(id) -> (id >> 1) ^ (-( id & 1) & 0x90000000) ^ (-((id >> 15) & 1) & 0x00006000)
You can also easily generate previous ID with this formula:
(id) -> (id << 1) ^ (-((id >> 13) & 1) & 0x0000C000) ^ (-( id >> 31) & 0x20000001)
Thank you very much for posting the formula and the article which was very nice to read!
There were many good things mentioned but the most interesting one for me (regarding D2) was
that LFSR include the generation of pseudo-random numbers and sequences, too.
From the formula you have posted, we can clearly see that this is the case (a PRNG is used for generating IDs and we now know its state).
Now it would be interesting to know where else those PRNGs are used in this game and what their state is.
After all the information posted in this topic, I wouldn't be too much surprised if they were also used to generate an items stats.
In plain terms, one should also be able to predict an items stats and it seems to be most efficient to use it on the imbue quest.
In theory, it should also be possible to use it on chests which sounds pretty much like chest-hack. Plainly and simply said, the main difference is
that you reset the items stats instead of resetting the objects state.
It sounds very possible and I can only hope that Blizzard fixed this already.